using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary.Helpers.Builders;

namespace fenk.Ventas
{
    public partial class ImpresionComprobantes : mvLibrary.BaseForm
    {
        public ImpresionComprobantes()
        {
            InitializeComponent();
        }
        public override void BeforeSaveReport()
        {
            // usuario
            UniItem.Replace(5, User);
        }


        /*Con esto adaptamos el reporte que antes solo se imprimia en pick,
         * para poder imprimirlo en windows y que quede prolijo.
         */
        public override void BeforeCreatePdf(ref string report)
        {
            
            PickReportFormatterBuilder reportFormatterBuilder = new PickReportFormatterBuilder(report);

            reportFormatterBuilder.RemoveInitialCLetterError();
            reportFormatterBuilder.ReduceTwoEspacesToOne();
            reportFormatterBuilder.RemoveEWAndFWError();
            report = reportFormatterBuilder.Build();
        }
    }
}

